﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace WmsApp.UI
{
    public partial class TextEditState : TextEdit
    {
        public TextEditState()
        {
            InitializeComponent();
        }

        public override object EditValue
        {
            get
            {
                return base.EditValue;
            }
            set
            {
                base.EditValue = value;
                if(value != null)
                {
                    if ((String)value == @"草稿")
                    {
                        this.BackColor = Color.Khaki;
                    }
                    else if ((String)value == @"确认")
                    {
                        this.BackColor = Color.LightSteelBlue;
                    }
                    else if ((String)value == @"作废")
                    {
                        this.BackColor = Color.Red;
                    }
                    else if ((String)value == @"发票已确认")
                    {
                        this.BackColor = Color.LightSteelBlue;
                    }
                    else if ((String)value == @"发票未确认")
                    {
                        this.BackColor = Color.Khaki;
                    }
                }
            }
        }

    }
}
